package com.huishao.demo.entity;

import java.util.Date;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import lombok.EqualsAndHashCode;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 用于存储服务器的ssh秘钥信息(SshKey)表实体类
 *
 * @author makejava
 * @since 2023-03-13 09:28:28
 */
@ApiModel("SshKey")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ssh_key")
public class SshKey implements Serializable {

    private static final long serialVersionUID = 1L;

    //id
    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;
    //username
    @ApiModelProperty("username")
    private String username;
    //sshValue
    @ApiModelProperty("sshValue")
    @TableField(value = "ssh_value")
    private String sshValue;
    //createTime
    @ApiModelProperty("createTime")
    @TableField(value = "create_time", fill= FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    // fill = FieldFill.INSERT ~ fill = FieldFill.INSERT_UPDATE 自动填充时间！

}

